function init(){
	var json=JSON.parse(document.getElementById("json").innerHTML);
	var data = {
    	title : {text: "Resumen de Cursado"},	
    	data: [
			{type: "pie", showInLegend: true, dataPoints: [
					{  y: json.aprobadas, legendText:"Aprobadas", indexLabel: "Aprobadas" },
					{  y: json.pendientes, legendText:"Pendientes", indexLabel: "Pendientes" },
					{  y: json.regulares, legendText:"Regulares", indexLabel: "Regulares" },
					{  y: json.cursando, legendText:"Cursando" , indexLabel: "Cursando"}
	    	]
    		}
    	]
    };
    var chart = new CanvasJS.Chart("grafico", data);
    chart.render();
}
window.addEventListener("load", init, false);